﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class UserControl_newMenu : System.Web.UI.UserControl
{
    CategoryNewsController cateNewControl;

    DataTable dtNewCate;

    public List<CategoryNews> listCateNew = new List<CategoryNews>();
    protected void Page_Load(object sender, EventArgs e)
    {
        cateNewControl = new CategoryNewsController();

        dtNewCate = cateNewControl.GetAll();

        loadCateNew();
    }

    public void loadCateNew() {
        foreach (DataRow item in dtNewCate.Rows)
        {
            listCateNew.Add(new CategoryNews(item));
        }
    }
}